﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

public partial class ProductManager_OrderList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Master.ElementSelectedChange = GetTreeView;
            GetOrderList();
        }
    }

    private void GetOrderList()
    {
        GoShopping.BLL.Orders.OrderBean ob = new GoShopping.BLL.Orders.OrderBean();
        IList<GoShopping.Model.Order> io = ob.GetAllOrders();
        lvOrderList.DataSource = io;
        lvOrderList.DataBind();
    }
    private void GetTreeView()
    {
        TreeView tv = Master.MasterTreeView;
        SetControlCommon.GetPrdtTreeView(tv, Server.MapPath("Navigation.xml"), "order");
    }

    protected void lvOrderList_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        if (e.CommandName == "OrderDetail")
        {
            Response.Redirect("OrderDetail.aspx?ID=" + e.CommandArgument);
        }
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {

    }
}
